We are all in one thread anyway.
{
gtk_internal_return_val_if_fail (value != NULL, NULL);
- g_atomic_int_add (&value->ref_count, 1);
+ value->ref_count += 1;
return value;
}
if (value == NULL)
return;
- if (!g_atomic_int_dec_and_test (&value->ref_count))
+ value->ref_count -= 1;
+ if (value->ref_count > 0)
return;
value->class->free (value);
/* using define instead of struct here so compilers get the packing right */
#define GTK_CSS_VALUE_BASE \
const GtkCssValueClass *class; \
- volatile gint ref_count;
+ gint ref_count;
struct _GtkCssValueClass {
void (* free) (GtkCssValue *value);